#include <iostream>
#include <string>
#include <unistd.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <stdlib.h>
#include <winsock.h>
#include <ws2tcpip.h>

int main( /* data */ ){
    int server_fd,client_fd;
    struct sockaddr_in server_addr,client_addr;
    socklen_t client_addr_len;
    // create socket of UDP
    socket(PF_INET,SOCK_DGRAM,0);
    server_addr.sin_family=AF_INET;
    server_addr.sin_addr.s_addr=htonl(INADDR_ANY);
    server_addr.sin_port=htons("9090");
    client_addr.sin_port=htons("9090");
    client_addr.sin_addr.s_addr(" /* i do not know what is the IP of Store */ ");
    client_addr_len=sizeof(client_addr);
    if(bind(server_fd,(struct sockaddr*)&server_addr,sizeof(server_addr))==-1){
        perror("bind:");
        exit(1);
    }
    sendto(server_fd,/*data*/,/*length of data*/,0,
           (struct sockaddr*)&client_addr,client_addr_len);
    int len= recvfrom(server_fd,/* response of Store */,/* size */,0,
                      (struct sockaddr*),&client_addr_len);
    if(len==-1){
        perror("recvfrom:");
        exit(1);
        //send thing about fail to queue of message with the reason and the level
        //......
    }
    //send thing of success of thing to queue of message
    //......

    //record the data into file"\\data\\edge\\data_count.txt"
}
